clear;

dataDir = './data1119';

resultsDir = 'Results1119/';
%mkdir(resultsDir);
defaultPyrType = 'halfOctave'; % Half octave pyramid is default as discussed in paper
scaleAndClipLargeVideos = true; % With this enabled, approximately 4GB of memory is used

addpath(genpath(pwd));
%% Woman
inFile = fullfile(dataDir, 'woman.avi');
samplingRate = 60; % Hz
sigma = 3;
alpha = 15;
attenuateOtherFrequencies = true;
pyrType = defaultPyrType;

% Low frequencies
loCutoff = 0.35;
hiCutoff = 0.71;

if (scaleAndClipLargeVideos)
    phaseAmplify(inFile, alpha, loCutoff, hiCutoff, samplingRate, resultsDir,'sigma', sigma,'attenuateOtherFreq', attenuateOtherFrequencies,'pyrType', pyrType, 'scaleVideo', 0.9);
else
    phaseAmplify(inFile, alpha, loCutoff, hiCutoff, samplingRate, resultsDir,'sigma', sigma,'attenuateOtherFreq', attenuateOtherFrequencies,'pyrType', pyrType, 'scaleVideo', 1);
end
%% Woman
inFile = fullfile(dataDir, 'woman.avi');
samplingRate = 60; % Hz
sigma = 10;
alpha = 15;
attenuateOtherFrequencies = true;
pyrType = defaultPyrType;

% Low frequencies
loCutoff = 0.35;
hiCutoff = 0.71;

if (scaleAndClipLargeVideos)
    phaseAmplify(inFile, alpha, loCutoff, hiCutoff, samplingRate, resultsDir,'sigma', sigma,'attenuateOtherFreq', attenuateOtherFrequencies,'pyrType', pyrType, 'scaleVideo', 0.9);
else
    phaseAmplify(inFile, alpha, loCutoff, hiCutoff, samplingRate, resultsDir,'sigma', sigma,'attenuateOtherFreq', attenuateOtherFrequencies,'pyrType', pyrType, 'scaleVideo', 1);
end
%% Woman
inFile = fullfile(dataDir, 'woman.avi');
samplingRate = 60; % Hz
sigma = 50;
alpha = 15;
attenuateOtherFrequencies = true;
pyrType = defaultPyrType;

% Low frequencies
loCutoff = 0.35;
hiCutoff = 0.71;

if (scaleAndClipLargeVideos)
    phaseAmplify(inFile, alpha, loCutoff, hiCutoff, samplingRate, resultsDir,'sigma', sigma,'attenuateOtherFreq', attenuateOtherFrequencies,'pyrType', pyrType, 'scaleVideo', 0.9);
else
    phaseAmplify(inFile, alpha, loCutoff, hiCutoff, samplingRate, resultsDir,'sigma', sigma,'attenuateOtherFreq', attenuateOtherFrequencies,'pyrType', pyrType, 'scaleVideo', 1);
end

